import request from '@/plugins/request'
import { IResponseData } from '@/types/request-base'
import { json2FormData } from '@/utils'
// 查询相关接口

/**
 * SADd地址搜索
 * @param {object} data 参数
 */
export function querySadAddress(keyword: string) {
  return request<IResponseData>({
    method: 'GET',
    url: `/app/TaskManage/GetSADAddress`,
    params: { keyword }
  })
}

/**
 * HR人员搜索
 * @param {object} data 参数
 */
export function queryHrUser(keyword: string) {
  return request<IResponseData>({
    method: 'GET',
    url: `/app/TaskManage/GetHRUser`,
    params: { code: keyword }
  })
}

/**
 * SAS人员搜索
 * @param {object} data 参数
 */
export function querySysUser({ page, rows, keyword }: any) {
  const data: any = {
    pageIndex: page,
    pageRows: rows,
    pageFlag: true
  }
  if (keyword) {
    data.searchWorld = keyword
  }
  return request<IResponseData>({
    method: 'POST',
    url: `/app/TaskManage/GetSysUser`,
    data
  })
}
